﻿@model MvcMercadoLibre.Models.Articulo
<script src="@Url.Content("~/Scripts/jquery-1.4.4.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@using (Html.BeginForm("Edit", "Articulo", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Articulo</legend>
        @Html.HiddenFor(model => model.Id)
        <div class="editor-label">
            @Html.LabelFor(model => model.Nombre)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Nombre)
            @Html.ValidationMessageFor(model => model.Nombre)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Precio)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Precio)
            @Html.ValidationMessageFor(model => model.Precio)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Cantidad)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Cantidad)
            @Html.ValidationMessageFor(model => model.Cantidad)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.UrlImagen)
        </div>
        <div class="editor-field">
            @Html.Image("../../Content/Images/Products", Model.UrlImagen)
            @*@Html.EditorFor(model => model.UrlImagen)
            @Html.ValidationMessageFor(model => model.UrlImagen)*@
            <input type="file" id="file" name="file" />
        </div>
        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}
<div>
    @Html.ActionLink("Back to List", "Index")
</div>
